module.exports = class extends think.kms.extIndex {
  // 验证码
  async geetestAction() {
    const geetest = this.service('ext/geetest');
    // think.logger.debug(geetest);
    if (this.isPost) {
      const post = this.post();
      const res = await geetest.validate(this.ctx, post);
      return this.json(res);
    } else {
      const res = await geetest.register(this.ctx);
      return this.json(res);
    }
  }
};
